Using functionality such as an interpreter or just-in-time compiler, a virtual machine may provide a platform for execution of high-level programming language on suitable computing hardware. The virtual machine may take high-level program code written in the high-level programming language and generate executable program code for the underlying computing hardware. The program code that runs on the virtual machine may be substantially platform-independent, such that different implementations of the virtual machine may interpret or just-in-time compile the same set of high-level program code for execution on a plurality of types of computing hardware running any of a plurality of underlying operating systems.
As part of the process of generating executable code for the underlying hardware, the virtual machine may re-write program code to introduce various optimizations. For example, a just-in-time compiler that compiles bytecode to native code may make a trade-off between the time to compile the code and the eventual execution time of the compiled code. Generally speaking, the more optimization that is performed by the just-in-time compiler, the higher the quality of the compiled code, and the longer to produce the compiled code.
While embodiments are described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that embodiments are not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit embodiments to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning “having the potential to”), rather than the mandatory sense (i.e., meaning “must”). Similarly, the words “include,” “including,” and “includes” mean “including, but not limited to.”